From db77a7c910a1054b07b5564e510d688a58448cd0 Mon Sep 17 00:00:00 2001 From: zccrs Date: Mon, 15 Jan 2018 17:05:15 +0800 Subject: [PATCH] refactor: give preference to using the git command to get the version when VERSION is empty Change-Id: Ie0a1789608cb7b031d41f46702d6ae807eb980e4 --- .qmake.conf | 2 +- src/lib.pri | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.qmake.conf b/.qmake.conf index c2bf5e3..c33dce5 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1 +1 @@ -isEmpty(VERSION):VERSION=2.0.6 +isEmpty(DTK_VERSION):DTK_VERSION=2.0.6 diff --git a/src/lib.pri b/src/lib.pri index fcd8925..69c80d4 100644 --- a/src/lib.pri +++ b/src/lib.pri @@ -2,9 +2,9 @@ TEMPLATE = lib isEmpty(VERSION) { VERSION = $$system(git describe --tags --abbrev=0) + isEmpty(VERSION):VERSION = $$DTK_VERSION isEmpty(VERSION):error(VERSION is empty) VERSION = $$replace(VERSION, [^0-9.],) - message(Version \"$$VERSION\" from git) } isEmpty(VER_MAJ) { -- 2.30.2